<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>FCKeditorAPI</title>
	<script type="text/javascript">

var InstanceCounter = 0 ;


function CreateInstance()
{
	var oIFrame = document.createElement( 'iframe' ) ;
	oIFrame.width = '100%' ;
	oIFrame.height = 100 ;
	oIFrame.src = 'test1_inner.html' ;

	document.getElementById( 'xInstances' ).appendChild( oIFrame ) ;
}

function RemoveFirstInstance()
{
	var eInstances = document.getElementById( 'xInstances' ) ;
	if ( !eInstances.firstChild )
	{
		alert( 'There are no instances to remove' ) ;
		return ;
	}

	eInstances.removeChild( eInstances.firstChild ) ;
}


	</script>
</head>
<body>
	<h1>
		FCKeditorAPI</h1>
	<p>
		Click the following button to create instances:
	</p>
	<p>
		<input type="button" value="Create Instance" onclick="CreateInstance();" />
		<input type="button" value="Remove First Instance" onclick="RemoveFirstInstance();" />
	</p>
	<hr />
	<div id="xInstances"></div>
</body>
</html>
